<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/mytaglib.tld" prefix="mytag" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<fmt:setBundle basename="ua.races.raceBundle"/>

<html>
<head><title>Choosing bet type</title></head>
<body>
<c:set var="logoutText"><fmt:message key="logout"/></c:set>
<mytag:logout text="${logoutText}"/>

<jsp:useBean id="betTypes" type="java.util.List" scope="request"/>
<jsp:useBean id="raceId" type="java.lang.String" scope="request"/>

<c:set var="pleaseText"><fmt:message key="client.betType.please.choose"/></c:set>
<c:set var="chooseText"><fmt:message key="client.type.choose"/></c:set>
<c:set var="betTypeText"><fmt:message key="races.typeOfBet"/></c:set>


<H3 align="center">${pleaseText}</H3>

<table align="center" summary="" border="1" bgcolor="#fff0f5">
    <thead bgcolor="#faebd7">
    <tr>
        <th>${betTypeText}</th>
        <th>${chooseText}</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="betType" items="${betTypes}">
        <form action="addBetToDb.do" method="GET">
            <tr>
                <td><input type="hidden" name="betTypeId" value="${betType.betTypeId}">
                    <c:out value="${betType.betType}"/>
                </td>
                <input type="hidden" name="raceId" value="${raceId}">
                <td><input type="submit" value="${chooseText}"/></td>
            </tr>
        </form>
    </c:forEach>
    </tbody>
</table>

</body>
</html>